<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.20"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>yLib: yLib::yTcpSocket Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">yLib
   &#160;<span id="projectnumber">V0.0.9 beta</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.20 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('classyLib_1_1yTcpSocket.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pri-attribs">Private Attributes</a> &#124;
<a href="classyLib_1_1yTcpSocket-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">yLib::yTcpSocket Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="ytcpsocket_8h_source.html">ytcpsocket.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for yLib::yTcpSocket:</div>
<div class="dyncontent">
 <div class="center">
  <img src="classyLib_1_1yTcpSocket.png" usemap="#yLib::yTcpSocket_map" alt=""/>
  <map id="yLib::yTcpSocket_map" name="yLib::yTcpSocket_map">
<area href="classyLib_1_1yAbstractSocket.html" alt="yLib::yAbstractSocket" shape="rect" coords="0,56,134,80"/>
<area href="classyLib_1_1yObject.html" title="This is base-class of the all object in yLib." alt="yLib::yObject" shape="rect" coords="0,0,134,24"/>
  </map>
</div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:af9a69b1cea8ff48f2f83839ce16b5ae3"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classyLib_1_1yTcpSocket.html#af9a69b1cea8ff48f2f83839ce16b5ae3">yTcpSocket</a> ()</td></tr>
<tr class="separator:af9a69b1cea8ff48f2f83839ce16b5ae3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aea01be79d8927f2e89af25a3d863158e"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classyLib_1_1yTcpSocket.html#aea01be79d8927f2e89af25a3d863158e">yTcpSocket</a> (int socket_flags_, bool is_block_=true)</td></tr>
<tr class="separator:aea01be79d8927f2e89af25a3d863158e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a504cd9a66bbb51bc4a23aa629fd09f87"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classyLib_1_1yTcpSocket.html#a504cd9a66bbb51bc4a23aa629fd09f87">~yTcpSocket</a> ()</td></tr>
<tr class="separator:a504cd9a66bbb51bc4a23aa629fd09f87"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad6dc6cb92393c2e11d8957dcf624746c"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classyLib_1_1yTcpSocket.html#ad6dc6cb92393c2e11d8957dcf624746c">socket_is_ready</a> (void)</td></tr>
<tr class="separator:ad6dc6cb92393c2e11d8957dcf624746c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a36d147b5d939e79ac22ec2ae008d3451"><td class="memItemLeft" align="right" valign="top">int8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classyLib_1_1yTcpSocket.html#a36d147b5d939e79ac22ec2ae008d3451">bind</a> (const <a class="el" href="src_2CMakeLists_8txt.html#a296644e9ff1d0a602b4703f361406374">std::string</a> &amp;ip_, int32_t port_)</td></tr>
<tr class="separator:a36d147b5d939e79ac22ec2ae008d3451"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae9e7c918a52c7b65ed81fde91f4f1111"><td class="memItemLeft" align="right" valign="top">int8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classyLib_1_1yTcpSocket.html#ae9e7c918a52c7b65ed81fde91f4f1111">connect</a> (const <a class="el" href="src_2CMakeLists_8txt.html#a296644e9ff1d0a602b4703f361406374">std::string</a> &amp;ip_, int32_t port_)</td></tr>
<tr class="separator:ae9e7c918a52c7b65ed81fde91f4f1111"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2b9eb5151f987659eb2540b7bd8759cf"><td class="memItemLeft" align="right" valign="top">int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classyLib_1_1yTcpSocket.html#a2b9eb5151f987659eb2540b7bd8759cf">read</a> (void *buffer_, size_t count_)</td></tr>
<tr class="separator:a2b9eb5151f987659eb2540b7bd8759cf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a32974bfb62c4ab939cf34660267e7629"><td class="memItemLeft" align="right" valign="top">int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classyLib_1_1yTcpSocket.html#a32974bfb62c4ab939cf34660267e7629">write</a> (const void *buffer_, size_t count_)</td></tr>
<tr class="separator:a32974bfb62c4ab939cf34660267e7629"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classyLib_1_1yAbstractSocket"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classyLib_1_1yAbstractSocket')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classyLib_1_1yAbstractSocket.html">yLib::yAbstractSocket</a></td></tr>
<tr class="memitem:a08557e761b0a335f108d3b54376f7680 inherit pub_methods_classyLib_1_1yAbstractSocket"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classyLib_1_1yAbstractSocket.html#a08557e761b0a335f108d3b54376f7680">~yAbstractSocket</a> ()</td></tr>
<tr class="separator:a08557e761b0a335f108d3b54376f7680 inherit pub_methods_classyLib_1_1yAbstractSocket"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad59cba5fb67c19c0b526369623570fb1 inherit pub_methods_classyLib_1_1yAbstractSocket"><td class="memItemLeft" align="right" valign="top">int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classyLib_1_1yAbstractSocket.html#ad59cba5fb67c19c0b526369623570fb1">close</a> (int64_t fd_)</td></tr>
<tr class="separator:ad59cba5fb67c19c0b526369623570fb1 inherit pub_methods_classyLib_1_1yAbstractSocket"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af343dc1de87399fa73d25af51be7ed28 inherit pub_methods_classyLib_1_1yAbstractSocket"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classyLib_1_1yAbstractSocket.html#af343dc1de87399fa73d25af51be7ed28">socket_is_valid</a> (void)</td></tr>
<tr class="separator:af343dc1de87399fa73d25af51be7ed28 inherit pub_methods_classyLib_1_1yAbstractSocket"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classyLib_1_1yObject"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classyLib_1_1yObject')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classyLib_1_1yObject.html">yLib::yObject</a></td></tr>
<tr class="memitem:a4f7523f70c3832ac47812ca5d366adca inherit pub_methods_classyLib_1_1yObject"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classyLib_1_1yObject.html#a4f7523f70c3832ac47812ca5d366adca">yObject</a> ()</td></tr>
<tr class="memdesc:a4f7523f70c3832ac47812ca5d366adca inherit pub_methods_classyLib_1_1yObject"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default constructor.  <a href="classyLib_1_1yObject.html#a4f7523f70c3832ac47812ca5d366adca">More...</a><br /></td></tr>
<tr class="separator:a4f7523f70c3832ac47812ca5d366adca inherit pub_methods_classyLib_1_1yObject"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0e54fc8334031b969dbc4a4d45c489b3 inherit pub_methods_classyLib_1_1yObject"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classyLib_1_1yObject.html#a0e54fc8334031b969dbc4a4d45c489b3">yObject</a> (<a class="el" href="src_2CMakeLists_8txt.html#a296644e9ff1d0a602b4703f361406374">std::string</a> object_name_)</td></tr>
<tr class="memdesc:a0e54fc8334031b969dbc4a4d45c489b3 inherit pub_methods_classyLib_1_1yObject"><td class="mdescLeft">&#160;</td><td class="mdescRight">Override constructor.  <a href="classyLib_1_1yObject.html#a0e54fc8334031b969dbc4a4d45c489b3">More...</a><br /></td></tr>
<tr class="separator:a0e54fc8334031b969dbc4a4d45c489b3 inherit pub_methods_classyLib_1_1yObject"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a94c1477907a7d2cad4ee2ad321ba571a inherit pub_methods_classyLib_1_1yObject"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classyLib_1_1yObject.html#a94c1477907a7d2cad4ee2ad321ba571a">yObject</a> (const <a class="el" href="classyLib_1_1yObject.html">yObject</a> &amp;object_)=delete</td></tr>
<tr class="memdesc:a94c1477907a7d2cad4ee2ad321ba571a inherit pub_methods_classyLib_1_1yObject"><td class="mdescLeft">&#160;</td><td class="mdescRight">Copy constructor.  <a href="classyLib_1_1yObject.html#a94c1477907a7d2cad4ee2ad321ba571a">More...</a><br /></td></tr>
<tr class="separator:a94c1477907a7d2cad4ee2ad321ba571a inherit pub_methods_classyLib_1_1yObject"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5bdd44e891dc768a9a414618756818fd inherit pub_methods_classyLib_1_1yObject"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classyLib_1_1yObject.html">yObject</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classyLib_1_1yObject.html#a5bdd44e891dc768a9a414618756818fd">operator=</a> (const <a class="el" href="classyLib_1_1yObject.html">yObject</a> &amp;object_)=delete</td></tr>
<tr class="memdesc:a5bdd44e891dc768a9a414618756818fd inherit pub_methods_classyLib_1_1yObject"><td class="mdescLeft">&#160;</td><td class="mdescRight">Assignment constructor.  <a href="classyLib_1_1yObject.html#a5bdd44e891dc768a9a414618756818fd">More...</a><br /></td></tr>
<tr class="separator:a5bdd44e891dc768a9a414618756818fd inherit pub_methods_classyLib_1_1yObject"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a409ebd4dd4b5b5ca41de594eb6a6980b inherit pub_methods_classyLib_1_1yObject"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classyLib_1_1yObject.html#a409ebd4dd4b5b5ca41de594eb6a6980b">yObject</a> (const <a class="el" href="classyLib_1_1yObject.html">yObject</a> &amp;&amp;object_)=delete</td></tr>
<tr class="memdesc:a409ebd4dd4b5b5ca41de594eb6a6980b inherit pub_methods_classyLib_1_1yObject"><td class="mdescLeft">&#160;</td><td class="mdescRight">Move constructor.  <a href="classyLib_1_1yObject.html#a409ebd4dd4b5b5ca41de594eb6a6980b">More...</a><br /></td></tr>
<tr class="separator:a409ebd4dd4b5b5ca41de594eb6a6980b inherit pub_methods_classyLib_1_1yObject"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0aebad488c9d1f92f89f3074a23a3f90 inherit pub_methods_classyLib_1_1yObject"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classyLib_1_1yObject.html">yObject</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classyLib_1_1yObject.html#a0aebad488c9d1f92f89f3074a23a3f90">operator=</a> (const <a class="el" href="classyLib_1_1yObject.html">yObject</a> &amp;&amp;object_)=delete</td></tr>
<tr class="memdesc:a0aebad488c9d1f92f89f3074a23a3f90 inherit pub_methods_classyLib_1_1yObject"><td class="mdescLeft">&#160;</td><td class="mdescRight">Assignment constructor.  <a href="classyLib_1_1yObject.html#a0aebad488c9d1f92f89f3074a23a3f90">More...</a><br /></td></tr>
<tr class="separator:a0aebad488c9d1f92f89f3074a23a3f90 inherit pub_methods_classyLib_1_1yObject"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a19061becef2eb18430987e9024d92a5b inherit pub_methods_classyLib_1_1yObject"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classyLib_1_1yObject.html#a19061becef2eb18430987e9024d92a5b">~yObject</a> ()</td></tr>
<tr class="memdesc:a19061becef2eb18430987e9024d92a5b inherit pub_methods_classyLib_1_1yObject"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default destructor.  <a href="classyLib_1_1yObject.html#a19061becef2eb18430987e9024d92a5b">More...</a><br /></td></tr>
<tr class="separator:a19061becef2eb18430987e9024d92a5b inherit pub_methods_classyLib_1_1yObject"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-attribs"></a>
Private Attributes</h2></td></tr>
<tr class="memitem:a69c5240700cf8bb1e65f69d701d7a265"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structstruct.html">struct</a> sockaddr_in&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classyLib_1_1yTcpSocket.html#a69c5240700cf8bb1e65f69d701d7a265">client_socket_addr</a></td></tr>
<tr class="separator:a69c5240700cf8bb1e65f69d701d7a265"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="inherited"></a>
Additional Inherited Members</h2></td></tr>
<tr class="inherit_header pub_attribs_classyLib_1_1yObject"><td colspan="2" onclick="javascript:toggleInherit('pub_attribs_classyLib_1_1yObject')"><img src="closed.png" alt="-"/>&#160;Public Attributes inherited from <a class="el" href="classyLib_1_1yObject.html">yLib::yObject</a></td></tr>
<tr class="memitem:a2db8b0c6fba5a9137092715442866090 inherit pub_attribs_classyLib_1_1yObject"><td class="memItemLeft" align="right" valign="top"><a class="el" href="src_2CMakeLists_8txt.html#a296644e9ff1d0a602b4703f361406374">std::string</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classyLib_1_1yObject.html#a2db8b0c6fba5a9137092715442866090">object_name</a></td></tr>
<tr class="memdesc:a2db8b0c6fba5a9137092715442866090 inherit pub_attribs_classyLib_1_1yObject"><td class="mdescLeft">&#160;</td><td class="mdescRight">The object-name.  <a href="classyLib_1_1yObject.html#a2db8b0c6fba5a9137092715442866090">More...</a><br /></td></tr>
<tr class="separator:a2db8b0c6fba5a9137092715442866090 inherit pub_attribs_classyLib_1_1yObject"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pro_methods_classyLib_1_1yAbstractSocket"><td colspan="2" onclick="javascript:toggleInherit('pro_methods_classyLib_1_1yAbstractSocket')"><img src="closed.png" alt="-"/>&#160;Protected Member Functions inherited from <a class="el" href="classyLib_1_1yAbstractSocket.html">yLib::yAbstractSocket</a></td></tr>
<tr class="memitem:ab31ee04339a6a7c259927977a4415c3d inherit pro_methods_classyLib_1_1yAbstractSocket"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classyLib_1_1yAbstractSocket.html#ab31ee04339a6a7c259927977a4415c3d">yAbstractSocket</a> ()</td></tr>
<tr class="separator:ab31ee04339a6a7c259927977a4415c3d inherit pro_methods_classyLib_1_1yAbstractSocket"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pro_static_methods_classyLib_1_1yAbstractSocket"><td colspan="2" onclick="javascript:toggleInherit('pro_static_methods_classyLib_1_1yAbstractSocket')"><img src="closed.png" alt="-"/>&#160;Static Protected Member Functions inherited from <a class="el" href="classyLib_1_1yAbstractSocket.html">yLib::yAbstractSocket</a></td></tr>
<tr class="memitem:a0e215a3b815f683f2f0591ec72a0fa73 inherit pro_static_methods_classyLib_1_1yAbstractSocket"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="src_2CMakeLists_8txt.html#a296644e9ff1d0a602b4703f361406374">std::string</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classyLib_1_1yAbstractSocket.html#a0e215a3b815f683f2f0591ec72a0fa73">get_ip_from_binary</a> (uint64_t ip_)</td></tr>
<tr class="separator:a0e215a3b815f683f2f0591ec72a0fa73 inherit pro_static_methods_classyLib_1_1yAbstractSocket"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acc2d807cc84ad5dd10a11d46a90729f8 inherit pro_static_methods_classyLib_1_1yAbstractSocket"><td class="memItemLeft" align="right" valign="top">static uint64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classyLib_1_1yAbstractSocket.html#acc2d807cc84ad5dd10a11d46a90729f8">get_port_from_binary</a> (uint64_t port_)</td></tr>
<tr class="separator:acc2d807cc84ad5dd10a11d46a90729f8 inherit pro_static_methods_classyLib_1_1yAbstractSocket"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4932fcf2319ac33136362a2ac8f95382 inherit pro_static_methods_classyLib_1_1yAbstractSocket"><td class="memItemLeft" align="right" valign="top">static int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classyLib_1_1yAbstractSocket.html#a4932fcf2319ac33136362a2ac8f95382">translate_ip_to_binary</a> (const <a class="el" href="src_2CMakeLists_8txt.html#a296644e9ff1d0a602b4703f361406374">std::string</a> &amp;ip_)</td></tr>
<tr class="separator:a4932fcf2319ac33136362a2ac8f95382 inherit pro_static_methods_classyLib_1_1yAbstractSocket"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ade7d017e69d1fc3c297a62171adcb1f7 inherit pro_static_methods_classyLib_1_1yAbstractSocket"><td class="memItemLeft" align="right" valign="top">static uint64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classyLib_1_1yAbstractSocket.html#ade7d017e69d1fc3c297a62171adcb1f7">translate_port_to_binary</a> (uint64_t port_)</td></tr>
<tr class="separator:ade7d017e69d1fc3c297a62171adcb1f7 inherit pro_static_methods_classyLib_1_1yAbstractSocket"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pro_attribs_classyLib_1_1yAbstractSocket"><td colspan="2" onclick="javascript:toggleInherit('pro_attribs_classyLib_1_1yAbstractSocket')"><img src="closed.png" alt="-"/>&#160;Protected Attributes inherited from <a class="el" href="classyLib_1_1yAbstractSocket.html">yLib::yAbstractSocket</a></td></tr>
<tr class="memitem:adc2bfeb1f4d0067103e82eab019b558d inherit pro_attribs_classyLib_1_1yAbstractSocket"><td class="memItemLeft" align="right" valign="top">int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classyLib_1_1yAbstractSocket.html#adc2bfeb1f4d0067103e82eab019b558d">socket_fd</a></td></tr>
<tr class="separator:adc2bfeb1f4d0067103e82eab019b558d inherit pro_attribs_classyLib_1_1yAbstractSocket"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7010d3c8c4d18f9db3082e5fc515697d inherit pro_attribs_classyLib_1_1yAbstractSocket"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classyLib_1_1yAbstractSocket.html#a7010d3c8c4d18f9db3082e5fc515697d">is_bind_success</a></td></tr>
<tr class="separator:a7010d3c8c4d18f9db3082e5fc515697d inherit pro_attribs_classyLib_1_1yAbstractSocket"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="af9a69b1cea8ff48f2f83839ce16b5ae3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af9a69b1cea8ff48f2f83839ce16b5ae3">&#9670;&nbsp;</a></span>yTcpSocket() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">yTcpSocket::yTcpSocket </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="aea01be79d8927f2e89af25a3d863158e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aea01be79d8927f2e89af25a3d863158e">&#9670;&nbsp;</a></span>yTcpSocket() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">yTcpSocket::yTcpSocket </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>socket_flags_</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>is_block_</em> = <code>true</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a504cd9a66bbb51bc4a23aa629fd09f87"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a504cd9a66bbb51bc4a23aa629fd09f87">&#9670;&nbsp;</a></span>~yTcpSocket()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">yTcpSocket::~yTcpSocket </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a36d147b5d939e79ac22ec2ae008d3451"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a36d147b5d939e79ac22ec2ae008d3451">&#9670;&nbsp;</a></span>bind()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int8_t yTcpSocket::bind </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="src_2CMakeLists_8txt.html#a296644e9ff1d0a602b4703f361406374">std::string</a> &amp;&#160;</td>
          <td class="paramname"><em>ip_</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>port_</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>@description: bind a port for send </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">{type}</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>{type} </dd></dl>

<p>Implements <a class="el" href="classyLib_1_1yAbstractSocket.html#a46989c254ebb55384b1b3753bb881f73">yLib::yAbstractSocket</a>.</p>

</div>
</div>
<a id="ae9e7c918a52c7b65ed81fde91f4f1111"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae9e7c918a52c7b65ed81fde91f4f1111">&#9670;&nbsp;</a></span>connect()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int8_t yTcpSocket::connect </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="src_2CMakeLists_8txt.html#a296644e9ff1d0a602b4703f361406374">std::string</a> &amp;&#160;</td>
          <td class="paramname"><em>ip_</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>port_</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>@description: </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">{type}</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>{type} </dd></dl>

</div>
</div>
<a id="a2b9eb5151f987659eb2540b7bd8759cf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2b9eb5151f987659eb2540b7bd8759cf">&#9670;&nbsp;</a></span>read()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int64_t yTcpSocket::read </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>buffer_</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>count_</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>@description: </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">{type}</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>{type} =-1: a error occurred. =-2: no data to read.The file descriptor fd refers to a socket and has been marked nonblocking (O_NONBLOCK) = 0: server maybe close. <blockquote class="doxtable">
<p>0: read n bytes. </p>
</blockquote>
</dd></dl>
<p>@description: </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">{type}</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>{type} </dd></dl>

</div>
</div>
<a id="ad6dc6cb92393c2e11d8957dcf624746c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad6dc6cb92393c2e11d8957dcf624746c">&#9670;&nbsp;</a></span>socket_is_ready()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool yTcpSocket::socket_is_ready </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>@description: Check socket(), <a class="el" href="classyLib_1_1yTcpSocket.html#a36d147b5d939e79ac22ec2ae008d3451">bind()</a>, listen(), accept() and so on. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">{type}</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>{type} </dd></dl>

<p>Implements <a class="el" href="classyLib_1_1yAbstractSocket.html#a26d05836b67627fa767aceee6d7de599">yLib::yAbstractSocket</a>.</p>

</div>
</div>
<a id="a32974bfb62c4ab939cf34660267e7629"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a32974bfb62c4ab939cf34660267e7629">&#9670;&nbsp;</a></span>write()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int64_t yTcpSocket::write </td>
          <td>(</td>
          <td class="paramtype">const void *&#160;</td>
          <td class="paramname"><em>buffer_</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>count_</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>@description: </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">{type}</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>{type} =-1: a error occurred. &gt;=0: write n bytes.</dd></dl>
<p>@description: </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">{type}</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>{type} </dd></dl>

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="a69c5240700cf8bb1e65f69d701d7a265"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a69c5240700cf8bb1e65f69d701d7a265">&#9670;&nbsp;</a></span>client_socket_addr</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structstruct.html">struct</a> sockaddr_in yLib::yTcpSocket::client_socket_addr</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>/home/sky/yLib/include/network/<a class="el" href="ytcpsocket_8h_source.html">ytcpsocket.h</a></li>
<li>/home/sky/yLib/src/network/<a class="el" href="ytcpsocket_8cpp.html">ytcpsocket.cpp</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="namespaceyLib.html">yLib</a></li><li class="navelem"><a class="el" href="classyLib_1_1yTcpSocket.html">yTcpSocket</a></li>
    <li class="footer">Generated by <a href="http://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.8.20 </li>
  </ul>
</div>
</body>
</html>
